#include<iostream>
#include<string>
#include<sys/types.h>
#include<signal.h>

// ./mykill pid num
int main(int argc,char* argv[])
{
    if(argc != 3)
    {
        std::cout<< "格式错误" << std::endl;
        return 1;
    }
    int sig = std::stoi(argv[2]);
    pid_t pid = std::stoi(argv[1]);
    int n = kill(pid,sig);
    if(n == -1)
    {
        std::cout<<"kill fail" <<std::endl;
        return 1;
    }
    else
    {
        std::cout << "kill success " <<std::endl;
    }


    return 0;
}